package com.liu.threadPool.myPool;

/**
 * @author LIU
 * @version 1.0
 * @date 2023/8/4 11:34
 * @description:
 *    测试类:
 *         1: 创建线程池类对象;
 *         2: 提交多个任务
 */
public class Test {
    public static void main(String[] args) {
        // 1. 教线程池对象
        MyThreadPool pool = new MyThreadPool(2, 4, 20);

        // 2. 提交任务
        for (int i = 1; i <=40 ; i++) {
            MyTask task = new MyTask(i);
            pool.submit(task);
        }
    }
}
